<head>
{% init html_title = None %}
{% init _user_name = None %}
{% init FONT_SCALE = 100 %}
{% init show_menu  = True %}
{% init show_aside = False %}
{% init show_search = True %}
{% import xconfig %}

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{% if FONT_SCALE == 80 %}
  <meta name="viewport" content="width=device-width,initial-scale=0.8,maximum-scale=0.8,user-scalable=0"/>
{% elif FONT_SCALE == 120 %}
  <meta name="viewport" content="width=300,initial-scale=1.2,maximum-scale=1.2,user-scalable=0"/>
{% else %}
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0,user-scalable=0"/>
{% end %}

<title>{{xconfig.WebConfig.ui_title_prefix}}{%if html_title%} | {{T(html_title)}}{%end%}</title>

<link rel="shortcut icon" href="{{_server_home}}/_static/favicon.ico"/>
<link rel="bookmark" href="{{_server_home}}/_static/favicon.ico"/>
<link rel="stylesheet" href="{{_server_home}}/_static/css/app.build.css?ts={{_ts}}"/>
<link rel="stylesheet" href="{{_server_home}}/_static/css/common-card.css?ts={{_ts}}"/>

<script type="text/javascript" src="{{_server_home}}/_static/lib/jquery/jquery-1.12.4.min.js"></script>
<!-- 弹层组件 -->
<script type="text/javascript" src="{{_server_home}}/_static/lib/layer/layer.js"></script>
<!-- 模板引擎 -->
<script type="text/javascript" src="{{_server_home}}/_static/lib/art-template/template-web-4.13.2.js"></script>
<!-- 应用JS脚本,优先级更高，所以放在后面 -->
<script type="text/javascript" src="{{_server_home}}/_static/js/app.build.js?ts={{_ts}}"></script>

{% include common/layout/base_layout.html %}

{% if xconfig.WebConfig.record_location %}
<script type="text/javascript" src="{{_server_home}}/system/stats"></script>
{% end %}

{# 自定义的样式 #}
{% if xconfig.USER_CSS != None %}
  <link rel="stylesheet" type="text/css" href="{{_server_home}}/system/user.css?ts={{_ts}}">
{% end %}

{# 自定义脚本 #}
{% if xconfig.USER_JS != None %}
  <script type="text/javascript" src="{{_server_home}}/system/user.js?ts={{_ts}}" async="true"></script>
{% end %}

<script type="text/javascript">
  xnote.state.system.isAdmin = Boolean("{{_is_admin}}");
  xnote.state.system.nodeRole = '{{xconfig.get_system_config("node_role")}}';
  xnote.config.serverHome = "{{_server_home}}";
</script>

{% block head %} {% end %}

</head>
